<?php

class JobdoingWidget extends CWidget {

    public $title = 'User login';
    public $visible = true;
    public $array = array();
    public $model;

    public function init() {
        if ($this->visible) {
			$this->renderContent();  
        }
    }
    protected function renderContent() {
        $userid = Yii::app()->user->id;
        $criteria=new CDbCriteria;
        $criteria->join="INNER JOIN tbl_bidjob b ON t.id = b.job_id";
        $criteria->condition ="b.user_id = $userid AND t.status = 3";
        $this->model = Job::model()->findAll($criteria);
        $this->render('viewjobdoing',array());
    }

}

?>
